package cn.starrysky.hrm.client;

import cn.starrysky.hrm.domain.LoginUser;
import cn.starrysky.hrm.util.AjaxResult;
import feign.hystrix.FallbackFactory;

public class LoginUserFallbalkFactory implements FallbackFactory<LoginUserClient>{
    @Override
    public LoginUserClient create(Throwable cause) {
        return new LoginUserClient() {
            @Override
            public AjaxResult addOrUpdate(LoginUser loginUser) {
                return AjaxResult.me().setSuccess(false).setMessage("系统错误！请稍后");
            }
        };
    }
}
